#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include <sys/wait.h>

unsigned long iter;
char *cmd_argv[28];

int main( int argc, char *argv[]) {
	int slave, count, argstart = 3;
	unsigned long times;
	int status;
	time_t start;
	time_t interval;
	FILE *outfile = NULL, *errfile = NULL;

	outfile = fopen("p1.out", "w+");

	start = time(NULL);
	while (1) {
		dup2(fileno(outfile), STDOUT_FILENO);
//		fprintf(stdout, "# hello");
		fclose(outfile);
		sleep(1);
	}
	if (outfile) {
		fclose(outfile);
	}
	return 0;
}
